<include file="Common:head"/>
<script type="text/javascript" src="__PUBLIC__/Index/js/nav.js"></script>
<script type="text/javascript">
    var min_car="{:U('Show/min_car')}";
    var car_del="{:U('Show/cardel')}";
</script>
</head>

<body>
<!--顶部图片-->
<!-- <div id="top_img">
<img src="__PUBLIC__/Index/images/1213dtk.jpg"/>
</div> -->

<!--导航条部分开始-->
<div id="head_box" style="border-top:none;"> 
	<div id="head_middle">
    	<a href="#"><img src="__PUBLIC__/Index/images/logo.png"/></a>
        <form action="#" method="post">
        	<div id="search_p"></div>
        	<div id="search_text">
        	<input type="text" />
            </div>
            <div id="search_btn">
            <input type="submit" value="" />
            </div>
        </form>
        <div id="remen">
        	<span>热门搜索：</span>
            <a href="#" style="color:red;">surface</a>
            <a href="#" style="color:red;">999元滚筒</a>
            <a href="#" style="color:red;">iPhone5</a>
            <a href="#">三菱重工空调</a>
            <a href="#" style="color:red;">微单/电单</a>
            <a href="#">电视</a>
        </div>
    </div>
    <div id="menu_box">
    	<a  id="all_sort" href="#">全部商品分类</a>
        <a id="menu_first" href="{:U('Index/index')}" target='_parent'>首页</a>
        <a href="#">母婴</a>
        <a href="#">服饰</a>
        <a href="#">美妆</a>
        <a href="#">团购</a>
        <a href="#">品牌旗舰店</a>
        <a href="#">城市专区</a>
        <a href="#">积分商城</a>
        <a href="#">社区</a>
        <div id="jisuan">
    	<p class='min_car'><span id='car_count'><?php echo isset($_SESSION['car_count'])?$_SESSION['car_count']:0;?></span> 件 <span id="xia"></span></p>
    	<a href="{:U('Car/index')}">去结算</a>
        <div id='car_content' style="display:none;">
                        <!-- <dl>
                            <dt><img src='__PUBLIC__/Index/images/1204ggsy103105212_ls.jpg'/></dt>
                            <dd class='goods_name'><a href=''>LESMART莱斯玛特拼接男士立领羽绒服MDME10215(白色/L) 此</a></dd>
                            <dd>
                                <p><span>¥199.00</span> <b>x2</b></p>
                                <p><a>删除</a></p>
                            </dd>
                        </dl>
                        <div class='car_foot'>
                            <p>购物车中共 <span class='goods_number'>4</span> 件商品</p>
                            <p>共计：<span class='countprice'>¥ 599.00</span></p>
                            <a href="">结算</a>
                        </div> -->
        </div>
    	</div>
    </div> 
</div>
<!--导航条部分结束-->
<!--商品分类部分开始-->
<div id="shangpin_box" style="height:auto;position:relative;">
    <?php 
      if(S('category_nav')){
        $result=S('category_nav');
      }else{
        $db=M('category');
        $data=$db->order('id')->select();
        $result=recursion($data);
        S('category_nav',$result,3600*1);//缓存
      }
        ?>
	<div id="fenlei" style="display:none;position:absolute;top:-1px;left:0px; Z-index:300;border-top:1px solid #fff">
        <ul>
        <foreach name='result' item='v'>
        <li><a href="{:U('List/index',array('id'=>$v['id']))}">{$v.name}</a></li>       
        </foreach>
        </ul>
      </div>
      <foreach name='result' item='v'>
        <div class="comSortBox" style='Z-index:300;'>
            <div class="comSort">
                <ul>
                    <foreach name='v.child' item='value'>
                        <li>
                            <strong><a href="{:U('List/index',array('id'=>$value['id']))}" target='_parent'>{$value.name}</a></strong>
                            <span>
                                <foreach name='value.child' item='s'>
                                    <a href="{:U('List/index',array('id'=>$s['id']))}" target='_parent'>| {$s.name}</a>
                                </foreach>
                            </span>
                        </li>
                    </foreach>
                </ul>
            </div>
        </div>
      </foreach>
           
            
    
</div>
